﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using yafc.Interface;

namespace yafc.Data
{
	static public class UserPool
	{
		static Dictionary<string, User> users = new Dictionary<string, User>();

		static public bool TryGet(string ID, out User Value)
		{
			return users.TryGetValue(ID, out Value);
		}
		static public bool Add(User User)
		{
			lock(users)
			{
				if (users.ContainsKey(User.id))
					return false;
				users.Add(User.id, User);
				return true;
			}
		}
	}
}
